#pragma once

#include<stdio.h>
#include<stdlib.h>
#include<assert.h>

typedef int SLDataType;
typedef struct SeqList
{
    SLDataType* array;
    size_t size;
    size_t capacity;
}SL;

void SeqListInit(SL* psl);
void SeqListDestory(SL* psl);

void SeqListPushBack(SL* psl, SLDataType val);
void SeqListPushFront(SL* psl, SLDataType val);
void SeqListInsert(SL* psl, SLDataType val, size_t pos);

void SeqListPopBack(SL* psl);
void SeqListPopFront(SL* psl);
void SeqListErase(SL* psl, size_t pos);

void SeqListPrint(const SL* psl);
size_t SeqListFind(const SL* psl, SLDataType val);
void CheckCapacity(SL* psl);